<template>
	<view class="Banner">
		<swiper :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000" :circular="true" indicator-color="rgba(0,0,0,.5)" indicator-active-color="#fff">
			<swiper-item v-for="(item, index) in list.data" :key="index" @click="GoLink(item.link)">
				<view class="swiper-item"><image :src="item.url"></image></view>
			</swiper-item>
		</swiper>
	</view>
</template>
<script>
export default {
	components: {},
	data() {
		return {
			list: null
		};
	},
	props: {
		config: {
			type: Object //校验类型
			// default: ''
		}
	},
	mounted() {
		this.list = this.config;
		// console.log(this.config);
	},
	methods: {
		GoLink(url) {
			uni.navigateTo({
				url: url
			});
		}
	}
};
</script>
<style lang="less" scoped>
.Banner {
	height: 348rpx;
	swiper-item {
		height: 100%;
	}
	.swiper-item {
		width: 100%;
		height: 100%;
	}
}
</style>
